<?php
class PhotomanagerController extends SilkControllerBase {
	
	public function upload_file($params) {
		$target = "/var/www/silk/user_uploads/";
		$pathinfo = pathinfo($params["uploaded"]);
		$pathinfo["basename"] = str_replace("c:\\","", $pathinfo["basename"]);
		$target = $target . $pathinfo["basename"];
//		SilkGreg::barf("pathinf", $pathinfo);
		
//		echo "target: $target<br />";
		if(move_uploaded_file(basename($params['uploaded']), $target)) {
			echo "The file ". basename( $params['uploaded'] ). " has been uploaded";
		} else {
			echo "Sorry, there was a problem uploading your file.";
		}
	}
}

?>